<template>
  <view class="">
		<u--input
			placeholder="请输入反馈内容"
			border="surround"
			clearable
			v-model="text"
			customStyle="height: 200rpx"
		></u--input>
		<u-button type="primary" @tap="submit" text="确定"></u-button>
  </view>
</template>

<script>
export default {
	data() {
		return {
			text: ''
		}
	},
	methods: {
		submit: async function () {
			let openid = uni.getStorageSync('openid') //获取保存的身份信息
			let code = JSON.stringify("'" + openid + "'")
			const { data: res } = await this.$http.post(`/myInfo/getFeedback`, {phone: code, text: this.text})
			if(res == 'OK') {
				uni.showToast({
					title: '提交成功',
					duration: 2000,
					success: () => {
						this.text = ''
					}
				});
			}
		}
	}
}
</script>

<style>

</style>